__author__ = 'huskier'
from plot_figure import get_data_from_file
import matplotlib.pyplot as plt


fig = plt.figure()
ax = fig.add_subplot(111)
data_mat = get_data_from_file('T_P0_M1_ap_step_0.txt')
line1=ax.plot(data_mat)

data_file = get_data_from_file("T_P0_M1_cv_step_0.txt")
da=[]
line2=ax.plot(da)
y1_ylabel='wo'
y2_ylabel='you'

ax.legend((line1,),(y1_ylabel,))


data1,data2,data3,data4=[1,2,3],[2],[3],[4]

filenamelist=["T_P0_M1_ap_step_0.txt","None","T_P0_M1_cp_step_0.txt","T_P0_M1_fe_step_0.txt",]
data2plot=[data1,data2,data3,data4]

for each_data,each_file in zip(data2plot,filenamelist):

    each_data=get_data_from_file(each_file)

print data1

ax.plot(data1)
ax.plot(data2)
ax.plot(data3)
ax.plot(data4)
plt.show()